<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title>this is xml ,bitch</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="menu_css.css" rel="stylesheet">
        <script type="text/javascript">
            if(window.XMLHttpRequest){
                xmlhttp=new XMLHttpRequest();
            }
            else{
                xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
            }
            xmlhttp.open("GET","xml.xml",false);
            xmlhttp.send();
            xmlDoc=xmlhttp.responseXML;
            
            document.write("<ul id=\"main_menu\">");
            var x=xmlDoc.getElementsByTagName("mstyle");
            for(i=0;i<x.length;i++){
                document.write("<li>");
                document.write(x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue);
                document.write("<ul id=\"branch_menu\">");
                var z=x[i].getElementsByTagName("branch");
                for(j=0;j<z.length;j++){
                    document.write("<li>");
                    document.write(x[i].getElementsByTagName("bname")[j].childNodes[0].nodeValue);
                    document.write("</li>");
                }
                document.write("</ul>");
                document.write("</li>");
            }
            document.write("</ul>");
        </script>
    </head>
    <body>
        
    </body>
</html>

